<?php

namespace App\Models;



class News extends Model
{
    protected $table = 'news';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'sort_id', 'bridge_id', 'title', 'author', 'image', 'content'
    ];

    /**
     * 关联分类
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function newsSort(){
        return $this->belongsTo(NewsSort::class, 'sort_id');
    }
}
